import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: () => import('@/views/layout'),
    children: [{
      path: '',
      name: 'homePage',
      component: () => import('@/views/homePage')
    },
    {
      path: 'company',
      name: 'company',
      component: () => import('@/views/company')
    },
    {
      path: 'server',
      name: 'server',
      component: () => import('@/views/server')
    },
    {
      path: 'mine',
      name: 'mine',
      component: () => import('@/views/mine')
    }]
  },
  { // 这个组件不是导航四大组件页面 是mine里面的子页面
    path: '/mine/personalInfo',
    name: 'personalInfo',
    component: () => import('@/views/mine/view/personalInfo')
  },
  // 孟都
  {
    path: '/login',
    component: () => import('@/views/login')
  },
  {
    path: '/companyDetail/:companyId',
    name: 'companyDetail',
    component: () => import('@/views/companyDetail'),
    props: true
  },
  // 黄志伟
  {
    path: '/business',
    // 设置路由的名称，命名路由。
    name: 'business',
    component: () => import('@/views/homePage/components/business.vue')
  },
  {
    path: '/admin',
    // 设置路由的名称，命名路由。
    name: 'admin',
    component: () => import('@/views/administrator')
  },
  {
    path: '/authorize',
    // 设置路由的名称，命名路由。
    name: 'authorize',
    component: () => import('@/views/authorization')
  },
  // 卢雨龙
  {
    path: '/MyAttention', // 关注
    name: 'MyAttention',
    component: () => import('@/views/MyAttention')
  },
  {
    path: '/IntelligentSearch', // 智能搜索
    name: 'IntelligentSearch',
    component: () => import('@/views/IntelligentSearch')
  },
  {
    path: '/YuesaoDetails', // 月嫂详情
    // path: '/',
    name: 'YuesaoDetails',
    component: () => import('@/views/YuesaoDetails')
  },
  // // 邓旺
  // {
  //   path: '/professional', // 家政求职
  //   name: 'professional',
  //   component: () => import('@/views/professional')
  // },
  // {
  //   path: '/server', // 家政人员
  //   name: 'server',
  //   component: () => import('@/views/server')
  // },
  // {
  //   path: '/aboutMy', // 关于我们
  //   name: 'aboutMy',
  //   component: () => import('@/views/aboutMy')
  // },
  // 蔡凤仙
  // {
  //   path:'/Lookhousekeeping',//找家政服务
  //   name:'Lookhousekeeping',
  //   component:()=>import('@/views/Lookhousekeeping')
  // },
  // {
  //   path:'/Domesticworkers',//已联系家政人员
  //   name:'Domesticworkers',
  //   component:()=>import('@/views/Domesticworkers')
  // },
  // 李攀华
  {
    path: '/jiazheng',
    // path: '/',
    // redirect: '/jiazheng',
    component: () => import('../views/view/index.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
